package base_demo.demo5;

public class Demo {
    public static void main(String[] args) {
        //守护线程(备胎线程)
        //1.创建两个线程
        //2.创建分别的对象,并设置守护线程
        MyThread1 t1 = new MyThread1("no");
        MyThread2 t2 = new MyThread2("yes");
        //设置
        t2.setDaemon(true);
        //启动
        t1.start();
        t2.start();

    }
}
